package com.jsmy.marketing.adapter;


import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jsmy.marketing.R;
import com.jsmy.marketing.bean.YWgtjhBean;
import com.jsmy.marketing.utils.NetWork;


/**
 * Created with Android Studio.
 * User: wei_cd.
 * Date: 2018/4/23.
 * Time: 17:19.
 * To change for file | settings | file and code templates.
 */

public class PlantFragmentAdapter extends BaseQuickAdapter<YWgtjhBean.DataBean.ListBean, BaseViewHolder> {

    public PlantFragmentAdapter() {
        super(R.layout.fragment_plant_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, YWgtjhBean.DataBean.ListBean item) {
        helper.setText(R.id.tv_name, item.getXm())
                .setText(R.id.tv_time, item.getSj())
                .setText(R.id.tv_content, item.getNr());
        NetWork.setImageGlide(helper.getView(R.id.tv_name).getContext(),item.getIco(),(ImageView) helper.getView(R.id.img_avatar));
    }

}
